package com.house.util;

import com.house.common.Result;

public class ResultUtil {
    public static Result success(Integer code, Object data)
    {
        Result result = new Result();
        result.setCode(code);
        result.setData(data);
        result.setMsg("成功");
        return result;
    }


    public static Result failure(Integer code, Object data)
    {
        Result result = new Result();
        result.setCode(code);
        result.setMsg("失败");
        result.setData(data);
        return result;
    }

    public static Result failure(Integer code, String msg, Object data)
    {
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        result.setData(data);
        return result;
    }

}
